<!DOCTYPE html>
<html lang="zh-cn">

        <head>
                <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                <!-- bootstrap - css -->
                <link href="__ADMIN__BJUI/themes/css/bootstrap.min.css" rel="stylesheet">
                <!-- core - css -->
                <link href="__ADMIN__BJUI/themes/css/style.css" rel="stylesheet">
                <link href="__ADMIN__BJUI/themes/blue/core.css" id="bjui-link-theme" rel="stylesheet">
                <!-- plug - css -->
                <link href="__ADMIN__BJUI/plugins/niceValidator/jquery.validator.css" rel="stylesheet">
                <link href="__ADMIN__BJUI/themes/css/FA/css/font-awesome.min.css" rel="stylesheet">
                <!--[if lte IE 7]>
                <link href="__ADMIN__BJUI/themes/css/ie7.css" rel="stylesheet">
                <![endif]-->
                <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
                <!--[if lte IE 9]>
                    <script src="__ADMIN__BJUI/other/html5shiv.min.js"></script>
                    <script src="__ADMIN__BJUI/other/respond.min.js"></script>
                <![endif]-->
                <!-- jquery -->
                <link href="__ADMIN__theme/css/style.css" rel="stylesheet">
                <script src="__ADMIN__BJUI/js/jquery-1.7.2.min.js"></script>
                <!-- 以下是B-JUI的分模块未压缩版，建议开发调试阶段使用下面的版本 -->
                <script src="__ADMIN__BJUI/js/bjui-core.js"></script>
                <script src="__ADMIN__BJUI/js/bjui-regional.zh-CN.js"></script>
                <script src="__ADMIN__BJUI/js/bjui-frag.js"></script>
                <script src="__ADMIN__BJUI/js/bjui-alertmsg.js"></script>
                <!-- nice validate -->
                <script src="__ADMIN__BJUI/plugins/niceValidator/jquery.validator.js"></script>
                <script src="__ADMIN__BJUI/plugins/niceValidator/jquery.validator.themes.js"></script>
                <!-- bootstrap plugins -->
                <script src="__ADMIN__BJUI/plugins/bootstrap.min.js"></script>
                <script src="__ADMIN__jquery/plugins/jquery.form.js"></script>
                <script src="__ADMIN__theme/js/functions.js"></script>
                <title>红薯旅行登录页面</title>
        </head>

        <body >
                <img src="__ADMIN__theme/image/bglogin.png" class="bg" />
                <div class="container1">
                                <div class="col-md-4 col-md-offset-4">
                                        <div class="login-panel panel panel-default">
                                                <div class="panel-heading">
                                                        <h2 class="panel-title">
                                                                {:C('site.sitename')}管理系统
                                                        </h2>
                                                </div>
                                                <div class="panel-body">
                                                        <form role="form" action="" method="post">
                                                                <div class="form-group input-group">
                                                                        <span class="input-group-addon"><i class="fa fa-user fa-fw"></i>
                                                                        </span>
                                                                        <input class="form-control input-nm" name="account" id="username" type="email" placeholder="帐号" autofocus>
                                                                </div>
                                                                <div class="form-group input-group">
                                                                        <span class="input-group-addon"><i class="fa fa-key fa-fw"></i>
                                                                        </span>
                                                                        <input class="form-control input-nm" name="password" id="pwd" type="password" placeholder="密码">
                                                                </div>
                                                                <div class="form-group input-group">
                                                                        <span class="input-group-addon"><i class="fa fa-lock fa-fw"></i>
                                                                        </span>
                                                                        <input class="form-control input-nm" name="verify" id="verify" type="text" placeholder="验证码">
                                                                </div>
                                                                <div class="form-group">
                                                                        <img id="code_img" src="{:U('verify')}" title="单击此处刷新" onclick="javascript:refresh()" style="cursor: pointer; vertical-align: middle;" /> <a class="arefresh" href="#">单击此处刷新</a>
                                                                </div>
                                                                <!-- Change this to a button or input when using this as a form -->
                                                                <button type="button" class="btn btn-lg btn-success btn-block submitForm">登 陆</button>
                                                        </form>
                                                </div>
                                        </div>
                                </div>
                </div>
                <div class="footer1">Copyright &copy; {php}echo date('Y');{/php} 版权所有 <a target="_blank" href='{:C("site.siteurl")}' >红薯橱柜网</a></div> 

        </body>
        <script type="text/javascript">
                $("form").keydown(function(e) {
                        var e = e || event,
                                keycode = e.which || e.keyCode;
                        if (keycode === 13) {
                                $(".submitForm").trigger("click");
                        }
                });

                function refresh() {
                        var url = "{:U(\'verify?_=random\')}";
                        $('#code_img').attr('src', url.replace("random", Math.random()));
                }

                $(function() {
                        $('#verify').focus(function() {
                                $('#code_img').trigger("click");
                        });
                        $('.arefresh').click(function() {
                                $('#code_img').trigger("click");
                        })
                });

                $(function() {
                        $(".submitForm").click(function() {
                                if ($("#account").val() === '' || $("#password").val() === '' || $("#verify").val() === '') {
                                        //popup.alert("填写完整后方可登陆");
                                        $(this).alertmsg('error', "填写完整后方可登陆");
                                        return false;
                                }else{
                                $("form").submit();
                        }
                        });

                });
        </script>
</html>
